Do not release the GFile prematurely
authorEmmanuele Bassi <ebassi@gnome.org>
Fri, 1 May 2020 10:08:41 +0000 (11:08 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 12 May 2020 12:45:15 +0000 (13:45 +0100)
Otherwise we won't be able to access it to get the URI for the
GtkPrinterOption.

This fixes a regression introduced in commit 5f070ff2333.

gtk/gtkprinteroptionwidget.c

index a866abe85dc7414be38ee4c8cab592a1b60b5389..a63d6148061849a70ce45cdd3c05c87e3a96036a 100644 (file)
@@ -480,8 +480,6 @@ dialog_response_callback (GtkDialog              *dialog,
           g_free (filename_short);
           g_object_unref (info);
         }
-
-      g_object_unref (new_location);
     }
 
   gtk_window_destroy (GTK_WINDOW (dialog));
@@ -544,11 +542,10 @@ filesave_choose_cb (GtkWidget              *button,
     }
 
   g_signal_connect (dialog, "response",
-                    G_CALLBACK (dialog_response_callback), widget);
+                    G_CALLBACK (dialog_response_callback),
+                    widget);
   gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (dialog));
-  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static gchar *